home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F36918_teststrtakeWhile.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-12-29  |  1.3 KB  |  36 lines

  1. <xsl:stylesheet version="1.0" 
  2. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:MyTakeController="f:MyTakeController" 
  4. exclude-result-prefixes="xsl MyTakeController"
  5. >
  6.   <xsl:import href="str-takeWhile.xsl"/>
  7.   <xsl:import href="str-dropWhile.xsl"/>
  8.   
  9.   <MyTakeController:MyTakeController/>
  10.   
  11.   <xsl:output method="text"/>
  12.   <xsl:template match="/">
  13.     <xsl:variable name="vMyTakeController"
  14.                   select="document('')/*/MyTakeController:*[1]"/>
  15.     <xsl:call-template name="str-takeWhile">
  16.       <xsl:with-param name="pStr" select="string(/*)"/>
  17.       <xsl:with-param name="pController" select="$vMyTakeController"/>
  18.       <xsl:with-param name="pContollerParam" select="0123456789"/>
  19.     </xsl:call-template>
  20.     <xsl:value-of select="'<===>'"/>
  21.     <xsl:call-template name="str-dropWhile">
  22.       <xsl:with-param name="pStr" select="string(/*)"/>
  23.       <xsl:with-param name="pController" select="$vMyTakeController"/>
  24.       <xsl:with-param name="pContollerParam" select="0123456789"/>
  25.     </xsl:call-template>
  26.   </xsl:template>
  27.   
  28.   <xsl:template match="MyTakeController:*">
  29.       <xsl:param name="pChar" select="''"/>
  30.     <xsl:param name="pParams" select="/.."/>
  31.     
  32.     <xsl:if test="contains($pParams, $pChar)">1</xsl:if>
  33.   </xsl:template>
  34. </xsl:stylesheet>
  35.  
  36.